/**
 * Created by lwy on 2017/6/13.
 */

var id = GetQueryString('id');

$(function(){
    $.ajax({
        url:'/messagesC/getOneMessages.json',
        dataType:'json',
        type:'post',
        data:{
            messageId:id,
            token:getItem('token'),
        },
        success:function(data){
            if(data.code==-1){
                window.location.href="login.html";
            }
            if(data.code==0){
                mui.toast(data.msg);
            }
            if(data.code==1){
                var data = data.datas.message;
                $('.news-title').html(data.title);
                $('.news-time').html(data.createTime);
                $('.news-detail').html(data.content);
            }
        }
    })
})